<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>

    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
        <title>
            Fly社区
        </title>
       <link rel="stylesheet" href="/php2016-10-05/10-27/flyzzw/Public/layui/font/font_1466258017_0700355.css">
        <link rel="stylesheet" href="/php2016-10-05/10-27/flyzzw/Public/layui/css/layui.css">
        <link rel="stylesheet" href="/php2016-10-05/10-27/flyzzw/Public/layui/css/global.css">
        <link rel="stylesheet" data-href="http://res.layui.com/css/fly/stretch.css?t=1476955288388"
        class="fly-style">
    </head>

    <body>
        <div class="header">
            <div class="main">
                <a class="logo" href="<?php echo U('home/index/index');?>" title="Fly">
                    Fly社区
                </a>
                <div class="nav">
                    <a href="<?php echo U('home/index/jie');?>">
                        <i class="iconfont icon-wenda">
                        </i>
                        问答
                    </a>
                    <a href="{http://www.layui.com/}">
                        <i class="iconfont icon-ui">
                        </i>
                        框架
                    </a>
                </div>
                <?php if (!isset($_SESSION['uid'])) { ?>
                    <div class="nav-user">
                        <a class="unlogin" href="/user/login/">
                            <i class="iconfont icon-touxiang">
                            </i>
                        </a>
                        <span>
                            <a href="<?php echo U('home/login/index');?>">
                                登入
                            </a>
                            <a href="<?php echo U('home/register/index');?>">
                                注册
                            </a>
                        </span>
                        <p class="out-login">
                            <a href="<?php echo U('home/login/qqlogin');?>" onclick="layer.msg('正在通过QQ登入', {icon:16, shade: 0.1, time:0})"
                            class="iconfont icon-qq" title="QQ登入">
                            </a>
                            <a href="http://fly.layui.com:8098/app/weibo/" onclick="layer.msg('正在通过微博登入', {icon:16, shade: 0.1, time:0})"
                            class="iconfont icon-weibo" title="微博登入">
                            </a>
                        </p>
                     </div>
                <?php  }else{ ?>
                    <div class="nav-user">
                            <a class="avatar" href="<?php echo U('home/usercore/index');?>">
                                <?php if (substr($_SESSION['face'],0,4)=='http') { ?>
                                    <img src="<?php echo $_SESSION['face'] ?>">
                               <?php }else{ ?>
                                    <img src="/php2016-10-05/10-27/flyzzw/<?php echo $_SESSION['face'] ?>">
                                <?php } ?>
                                <cite>
                                    <?php echo $_SESSION['nikename']; ?>
                                </cite>
                            </a>
                            <div class="nav">
                                <a href="<?php echo U('home/usercore/set');?>">
                                    <i class="iconfont icon-shezhi">
                                    </i>
                                    设置
                                </a>
                                <a href="<?php echo U('home/login/out');?>">
                                    <i class="iconfont icon-tuichu" style="top: 0; font-size: 22px;">
                                    </i>
                                    退了
                                </a>
                    </div>
                </div>
               <?php } ?>
                
               

                
            </div>
        </div>
           <div class="main layui-clear">
            <div class="wrap">
                <div class="content" style="margin-right:0">
                    <div class="fly-tab">
               <span>
                    <a class="tab-this" href="<?php echo U('home/index/jie');?>">
                        全部
                    </a>
                    <a href="<?php echo U('home/index/unsolved');?>">
                        未结帖
                    </a>
                    <a href="<?php echo U('home/index/solved');?>">
                        已采纳
                    </a>
                    <a href="<?php echo U('home/index/wonderful');?>">
                        精帖
                    </a>
                    <?php if (!empty($_SESSION['uid'])) { ?>
                        <a href="<?php echo U('home/usercore/u');?>/id/<?php  echo $_SESSION['uid']?>">我的帖</a>
                   <?php  } ?>
                </span>
                        <form action="http://cn.bing.com/search" class="fly-search">
                            <i class="iconfont icon-sousuo">
                            </i>
                            <input class="layui-input" autocomplete="off" placeholder="搜索内容，回车跳转"
                            type="text" name="q">
                        </form>
                        <a href="/jie/add/" class="layui-btn jie-add">
                            发布问题
                        </a>
                    </div>
                          <?php  foreach ($res as $v) { ?>
                <ul class="fly-list">
                    <li class="fly-list-li">
                        <a href=
                            "<?php echo U('home/que/index','','');?>/id/<?php echo $v['id']; ?>"
                         class="fly-list-avatar">
                            <img src="/php2016-10-05/10-27/flyzzw/<?php echo $v['face'] ?>" alt="<?php echo $v['nikename'] ?>">
                        </a>
                        <h2 class="fly-tip">
                            <a href="<?php echo U('home/que/index','','');?>/id/<?php echo $v['id']; ?>">
                                <?php echo $v['title'] ?>
                            </a>
                            <?php if ($v['top']!='普通' || $v['jing']!='普通'){ ?>
                                <?php if ($v['jing']=='精华' && $v['top']=='置顶'){ ?>
                                     <span class="fly-tip-stick">置顶帖</span>
                                    <span class="fly-tip-jing">精帖</span> 
                                <?php }else if($v['jing']=='精华'){ ?>
                                    <span class="fly-tip-jing">精帖</span>
                                    <?php }?>
                                   
     
                            <?php } ?>
                
                        </h2>
                        <p>
                            <span>
                                <a href="/u/336">
                                     <?php echo $v['nikename'] ?>
                                </a>
                            </span>
                            <span>
                                <?php echo $v['create_time'] ?>
                            </span>
                            <span>
                                <?php echo $v['技术闲谈'] ?>
                            </span>
                            <span class="fly-list-hint">
                                <i class="iconfont" title="回答">
                                    
                                </i>
                                <?php echo $v['answer_num'] ?>
                                <i class="iconfont" title="人气">
                                    
                                </i>
                                <?php echo $v['view_num'] ?>
                            </span>
                        </p>
                    </li>
                </ul>
            <?php }?>
             <style type="text/css">
                .current{
                     background-color: #009E94;
                    color: #fff;
                    padding: 0 20px;
                    line-height: 36px;
                    border: 1px solid #009E94;
                    font-size: 14px;
                    display: inline-block;
                    vertical-align: top;
                }
                .num,.next,.prev{
                    padding: 0 20px;
                    line-height: 36px;
                    border: 1px solid #009E94;
                    font-size: 14px;
                    display: inline-block;
                    vertical-align: top;
                }
                .num{
                    border-right: none;
                }
                .next{
                    margin-left: -5px;
                }
        </style>

           <div style="text-align: center;padding-top:20px;">
            <?php if (!isset($_GET['p']) || $_GET['p']=='1' ){ ?>
                <div class="laypage-main">
                    <a href="<?php echo U(ACTION_NAME,array('p'=>2));?>" class="laypage-next">
                        更多求解
                    </a>
                </div>
            <?php }else if(!empty($show)){ echo $show; }else{ echo "没有更多问题，请返来上一页"; } ?>
                
            </div>
                </div>
                <!-- layer-728*90 -->
                <div class="fly-ad" style="height:90px; border:1px solid #DFDFDF; overflow: hidden; text-align: center;">
                    <script type="text/javascript">
                        /*728*90*/
                        var cpro_id = "u2482674";
                    </script>
                    <script src="http://cpro.baidustatic.com/cpro/ui/c.js" type="text/javascript">
                    </script>
                </div>
            </div>
        </div>

      
        <div class="footer">
            <p>
                <a href="http://fly.layui.com/">
                    Fly社区
                </a>
                2016 &copy;
                <a href="http://www.layui.com/">
                    layui.com
                </a>
                <a href="https://github.com/layui/fly" target="_blank">
                    获取Fly社区模版
                </a>
            </p>
            <p>
                <a href="http://fly.layui.com/auth/get" target="_blank">
                    产品授权
                </a>
                <a href="http://fly.layui.com/jie/3147.html" target="_blank">
                    VIP说明
                </a>
                <!--<a href="javascript:layer.msg('暂无此页');">关于我们</a>-->
                <a href="http://sentsin.com/cooperation.html" target="_blank">
                    商务合作
                </a>
                <a href="http://weibo.com/SentsinXu" target="_blank" rel="nofollow">
                    微博
                </a>
                <a href="http://fly.layui.com/jie/2461.html" target="_blank">
                    微信公众号
                </a>
            </p>
        </div>
    </body>

</html>